#include<iostream>
using namespace std;

class shape
{
    friend void view(shape& other);
public:
    shape(int len,int height)
    {
        this->height = height;
        this->len = len;
    }

    void print()
    {
        cout<<"len:"<<len<<" "<<"height:"<<height<<endl;
    }

private:
    int len;
    int height;
};

void view(shape& other)
{
    cout<<other.len<<endl;
    cout<<other.height<<endl;
}

int main()
{
    shape a(1,2);
    a.print();
    view(a);
}